import {
  IMGADD, IMGLIST, IMGDELETE, VERIFYUPLOAD,
  IMGUPDATE, TEXTDATA, TEXTEXPORT, RECORDLIST, EXPORTRECORDLIST, VERIFYEXPORT,
  BATCHDELETE, DETAIL,
  EXPORTREPORT, REPORTLIST, DOCEXPORT, SAVEMSGTEMP, GETMSGTEMP, VERIFYUPLOADBATCH, EXPORTDETAIL, ASSESS
} from "./api";
import { METHOD, request } from "@/utils/request";
// const BASE_URL = 'szycmc';
//导出检测记录列表
export function exportRecordList(params) {
  return request(EXPORTRECORDLIST, METHOD.POST, params, { responseType: 'blob', timeout: -1 });
}
//检测记录列表
export function recordList(params) {
  return request(RECORDLIST, METHOD.GET, params);
}
//列表
export function list(params) {
  return request(IMGLIST, METHOD.POST, params);
}
//新增
export function addRecord(params) {
  return request(IMGADD, METHOD.POST, params);
}
//编辑
export function updateRecord(params) {
  return request(IMGUPDATE, METHOD.POST, params);
}
//删除
export function delRecord(params) {
  return request(IMGDELETE, METHOD.POST, params);
}
export function verifyExport(params) {
  return request(VERIFYEXPORT, METHOD.POST, params, { responseType: 'blob' });
}
export function docExport(params) {
  return request(DOCEXPORT, METHOD.POST, params, { responseType: 'blob' });
}

export function textData(params) {
  return request(TEXTDATA, METHOD.POST, params);
}
export function textExport(params) {
  return request(TEXTEXPORT, METHOD.POST, params, { responseType: 'blob' });
}
export function upload(params) {
  return request(VERIFYUPLOAD, METHOD.POST, params);
}

export function uploadBatch(params) {
  return request(VERIFYUPLOADBATCH, METHOD.POST, params);
}

export function detail(params) {
  return request(DETAIL, METHOD.POST, params);
}
export function batchDelRecord(params) {
  return request(BATCHDELETE, METHOD.POST, params);
}
export function exportRecord(params) {
  return request(EXPORTREPORT, METHOD.POST, params, { responseType: 'blob', timeout: -1 });
}
export function reportList(params) {
  return request(REPORTLIST, METHOD.GET, params);
}
export function saveMsgTemp(params) {
  return request(SAVEMSGTEMP, METHOD.POST, params);
}
export function getMsgTemp(params) {
  return request(GETMSGTEMP, METHOD.POST, params);
}
//导出检测结果
export function exportDetail(params) {
  return request(EXPORTDETAIL, METHOD.POST, params, { responseType: 'blob', timeout: -1 });
}

// 评价
export function assess(params) {
  return request(ASSESS, METHOD.POST, params);
}
